//
//  ConstansCode.h
//  WhatToEat
//
//  Created by Mac on 15/3/18.
//  Copyright (c) 2015年 Mac. All rights reserved.
//

#ifndef WhatToEat_ConstansCode_h
#define WhatToEat_ConstansCode_h

//----------------------输出----------------------
#ifdef DEBUG
#define NSLog(FORMAT, ...) fprintf(stderr,"╭═════════════════════════════════════════════════════════╮ \n║方法:%s 行:%d \n║详情:%s\n\n", __FUNCTION__, __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#else
# define NSLog(...);
#endif


#define KRect(x,y,w,h)  CGRectMake(x, y, w, h)

#define NSLogRect(rect) NSLog(@"%s x:%.4f, y:%.4f, w:%.4f, h:%.4f", #rect, rect.origin.x, rect.origin.y, rect.size.width, rect.size.height)

#define NSLogInset(inset) NSLog(@"%s top:%.4f, left:%.4f, right:%.4f, bottom:%.4f", #inset, inset.top, inset.left, inset.right, inset.bottom)

#define NSLogSize(size) NSLog(@"%s w:%.4f, h:%.4f", #size, size.width, size.height)
#define NSLogPoint(point) NSLog(@"%s x:%.4f, y:%.4f", #point, point.x, point.y)
//----------------------输出----------------------


#define ApplicationDelegate ((AppDelegate *)[UIApplication sharedApplication].delegate)
#define kIsIOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define wImage(str) [UIImage imageNamed:(str)]
#define kUI_SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height)
#define kUI_SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width
#define kImgName(name, type) [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:name ofType:type]]
#define kTingColor [UIColor colorWithRed:255/225.0 green:133/255.0 blue:47/255.0 alpha:1]
#define kTextColor [UIColor colorWithRed:100/225.0 green:100/255.0 blue:100/255.0 alpha:1]
#define kTextLightColor [UIColor colorWithRed:100/225.0 green:100/255.0 blue:100/255.0 alpha:1]

#define kButtonColor [UIColor colorWithRed:255/225.0 green:152/255.0 blue:77/255.0 alpha:1]
#define kWhiteColor [UIColor colorWithRed:249/225.0 green:249/255.0 blue:249/255.0 alpha:1]
#define kLightGrayColor [UIColor colorWithRed:90/225.0 green:90/255.0 blue:90/255.0 alpha:1]
#define kLineColor [UIColor colorWithRed:224/225.0 green:224/255.0 blue:224/255.0 alpha:1]
#define kPlaceholderColor [UIColor colorWithRed:164/225.0 green:164/255.0 blue:164/255.0 alpha:1]

#define kLineColors [UIColor colorWithRed:240/255.0 green:241/255.0 blue:242/255.0 alpha:1]


#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self;
#define RandW5 @"DFYuanW5"
//#define RandW3 @"NotoSansHans-DemiLight"

#define updateInMyTable @"updateInMyTable"
#define k22 [UIFont systemFontOfSize:22]
#define k20 [UIFont systemFontOfSize:18]
#define kFont(i) [UIFont systemFontOfSize:i]
#define kCornerRadius 8
#define kNameLength 11


#define kStr(i) [NSString stringWithFormat:@"%@",i]
#define WeakSelf __weak typeof(self) weakSelf = self;
#define kNavigationTitleFont [UIFont fontWithName:RandW5 size:20.0]
#import "WebAPI.h"
#define kRadius 5
#define NSUserDefaultstandard [NSUserDefaults standardUserDefaults]
#import "WebAPI.h"
#import "UIImageView+AFNetworking.h"

#import "UIView+ViewFrameGeometry.h"
#import "IsEmail.h"
#import "Masonry.h"

#import "EATabBarController.h"
#import "CustomTabBarView.h"
#import "EANavigationController.h"
#import "Commtools.h"
#import "EAMYButton.h"
#import "EAPinKerView.h"
#import "EAMButton.h"
#import "EASaveUserMessage.h"
#import <ReactiveCocoa/ReactiveCocoa.h>


#import "MobClick.h"
#import "EATextField.h"
#import "EALabel.h"



//社会化分享
#import "UMSocialWechatHandler.h"
#import "UMSocial.h"
#import "UMSocialSinaHandler.h"
#import "UMSocialQQHandler.h"
#import "JSONKit.h"





#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self;
//#define ws  __weak __typeof(&*self)weakSelf = self;
//单例化一个类
#define SYNTHESIZE_SINGLETON_FOR_CLASS(classname) \
\
static classname *shared##classname = nil; \
\
+ (classname *)shared##classname \
{ \
@synchronized(self) \
{ \
if (shared##classname == nil) \
{ \
shared##classname = [[self alloc] init]; \
} \
} \
\
return shared##classname; \
} \
\
+ (id)allocWithZone:(NSZone *)zone \
{ \
@synchronized(self) \
{ \
if (shared##classname == nil) \
{ \
shared##classname = [super allocWithZone:zone]; \
return shared##classname; \
} \
} \
\
return nil; \
} \
\
- (id)copyWithZone:(NSZone *)zone \
{ \
return self; \
}

#endif

#define MobClickAppKey @"5526216afd98c5c09d001f13"

#define weiXinAppID @"wx29b76a050c1902c8"
#define weixinAppSecret @"9753701713045a03a854c9b7b01484e1"

#define qqAppID @"1104479947"
#define qqAppKey @"6E9vvN99alLzSCZY"



#define xinLangAppKey @"2794433879"
#define xinLangAppSecret @"439d0cd1d8c9944502f4672796dea56f"

#define shareTitle @"吃神马"
#define shareContent @"健康营养每一天，膳食搭配,吃出健康。"
#define shareUrl @"http://www.taobao.com/"
#define shareImage [UIImage imageNamed:@"logo641"]


//app_icon
//
//吃神马
//
//创建时间:2015-04-10 16:59:08
//
//APP ID:1104480353
//
//APP KEY:amnHeAvamu838iEa




//
//APP ID:1104480353
//
//APP KEY:amnHeAvamu838iEa




#define tenxinOpenAppID @"1104480353"
#define tenxinOpenAppIDKey @"amnHeAvamu838iEa"
//APP KEY:6E9vvN99alLzSCZY




